/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-04-25
 * Time: 18:11
 */
//Student：

//package Object;

public class Student {

    long studentID;

    int classID;

    String name;

    String sex;

    int age;

    public Student() {

    }

    public Student(long studentID, int classID, String name, String sex, int age) {

        this.studentID = studentID;

        this.classID = classID;

        this.name = name;

        this.sex = sex;

        this.age = age;

    }

    public long getStudentID() {

        return studentID;

    }

    public void setStudentID(long studentID) {

        this.studentID = studentID;

    }

    public int getClassID() {

        return classID;

    }

    public void setClassID(int classID) {

        this.classID = classID;

    }

    public String getName() {

        return name;

    }

    public void setName(String name) {

        this.name = name;

    }

    public String getSex() {

        return sex;

    }

    public void setSex(String sex) {

        this.sex = sex;

    }

    public int getAge() {

        return age;

    }

    public void setAge(int age) {

        this.age = age;

    }

    @Override

    public String toString() {

        return "Student{" +

                "学生ID=" + studentID +

                ", 班级ID=" + classID +

                ", 姓名='" + name + '\'' +

                ", 性别='" + sex + '\'' +

                ", 年龄=" + age +

                '}';

    }

}

JavaApplication：

        package Object;

public class JavaApplication {

    public static void main(String[] args) {

        Student student01 = new Student(2020240634,34,"赵港","男",21);

        System.out.println(student01);

        Student student02 = new Student();

        student02.setStudentID(2020240638);

        student02.setClassID(38);

        student02.setName("王志刚");

        student02.setSex("男");

        student02.setAge(21);

        System.out.println(student02.toString);

    }

}

